<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd"
    >
<html lang="en">
<head>
    <script type="text/javascript">
        var multiply = function(ma,mb){
            var len = function(a){ return a.length; }
            if( len(ma[0]) != len(mb) )
                throw new Error("incompatible size!");
            var res = [];            
            
            for( var i = 0, m = len(ma); i < m; i++){                                
                res[i] = [];                
                for( var j = 0, q = len(mb[0]); j < q; j++){                                        
                    var sum = 0;
                    for( var k = 0, r = len(mb); k < r; k++){                        
                        sum += ma[i][k] * mb[k][j];                        
                    }                    
                    res[i][j] = sum;
                }                
            }
            return res;
        }
        var rad = function( angle ){
            return angle * Math.PI / 180;
        }
        
        window.console.log( Math.cos(rad(0)) )
        window.console.log( Math.cos(rad(90)) )
        window.console.log( Math.cos(rad(180)) )

    </script>
</head>
<body>
    <!-- Insert your content here -->
</body>
</html>
